package cn.com.anypay.manager.payment.dto;

import java.util.Map;

/**
 * 产品配置数据传输对象
 *
 * 用于传输支付产品的配置信息
 *
 * @author AnyPay Team
 * @version 1.0
 * @since 2025-07-05
 */
public class ProductConfigDTO {

    /**
     * 产品类型
     */
    private String productType;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 渠道ID
     */
    private String channelId;

    /**
     * 是否启用
     */
    private boolean enabled = true;

    /**
     * 产品参数
     */
    private Map<String, Object> productParams;

    /**
     * 配置版本
     */
    private String configVersion;

    /**
     * 验证规则
     */
    private String[] validationRules;

    /**
     * 描述信息
     */
    private String description;

    /**
     * 创建时间
     */
    private java.util.Date createTime;

    /**
     * 更新时间
     */
    private java.util.Date updateTime;

    public ProductConfigDTO() {
    }

    public ProductConfigDTO(String productType, String channelId) {
        this.productType = productType;
        this.channelId = channelId;
        this.createTime = new java.util.Date();
        this.updateTime = new java.util.Date();
    }

    public ProductConfigDTO(String productType, String productName, String channelId, boolean enabled) {
        this.productType = productType;
        this.productName = productName;
        this.channelId = channelId;
        this.enabled = enabled;
        this.createTime = new java.util.Date();
        this.updateTime = new java.util.Date();
    }

    // Getters and Setters
    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public Map<String, Object> getProductParams() {
        return productParams;
    }

    public void setProductParams(Map<String, Object> productParams) {
        this.productParams = productParams;
    }

    public String getConfigVersion() {
        return configVersion;
    }

    public void setConfigVersion(String configVersion) {
        this.configVersion = configVersion;
    }

    public String[] getValidationRules() {
        return validationRules;
    }

    public void setValidationRules(String[] validationRules) {
        this.validationRules = validationRules;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public java.util.Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(java.util.Date createTime) {
        this.createTime = createTime;
    }

    public java.util.Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(java.util.Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "ProductConfigDTO{" +
                "productType='" + productType + '\'' +
                ", productName='" + productName + '\'' +
                ", channelId='" + channelId + '\'' +
                ", enabled=" + enabled +
                ", productParams=" + productParams +
                ", configVersion='" + configVersion + '\'' +
                ", validationRules=" + java.util.Arrays.toString(validationRules) +
                ", description='" + description + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}